@extends('layouts.auth')

@section('title', '控制面板')

@section('content')
<div class="P-UserCenter mt-2">
    <div class="container">
        <div class="row mb-3 d-none d-md-block bg-body rounded shadow-sm">
            @include('auth.partials.subnav')
        </div>

        @include('shared.flash-messages')

        <div class="row mb-3 bg-body rounded shadow-sm">
            <div class="col-12">
                <div class="border-bottom mt-4"><h4 class="fs-5 py-2">{{ $user->name }}，欢迎登陆</h4></div>
            </div>
            <div class="col-12 col-md-6">
                <ul class="list-group list-group-flush my-4">
                    <li class="list-group-item">
                        <span class="label">真实姓名：</span>
                        <span class="value">{{ $user->add->truename ?: '保密' }}</span>
                    </li>
                    <li class="list-group-item">
                        <span class="label">电子邮箱：</span>
                        <span class="value">{{ $user->email }}</span>
                    </li>
                    <li class="list-group-item">
                        <span class="label">验证时间：</span>
                        <span class="value">{{ $user->level_expires_at ?? '未验证' }}</span>
                    </li>
                    <li class="list-group-item">
                        <span class="label">已发布信息：</span>
                        <span class="value">6 </span>
                    </li>
                    <li class="list-group-item">
                        <span class="label">待审核信息：</span>
                        <span class="value">1 </span>
                    </li>
                </ul>
            </div>
            <div class="col-12 col-md-6">
                <ul class="list-group list-group-flush my-4">
                    <li class="list-group-item">
                        <span class="label">积分：</span>
                        <span class="value">{{ $user->points }}</span>
                    </li>
                    <li class="list-group-item">
                        <span class="label">会员等级：</span>
                        <span class="value" style="color: var(--bs-primary)"><a class="link-underline link-underline-opacity-0" href="{{ route('auth.group', ['accountType' => $accountType]) }}">普通会员</a></span>
                    </li>
                    <li class="list-group-item">
                        <span class="label">会员有效期：</span>
                        <span class="value">{{ $user->level_expires_at ?? '永久' }}</span>
                    </li>
                    <li class="list-group-item">
                        <span class="label">登陆次数：</span>
                        <span class="value">{{ $user->add->login_count }}</span>
                    </li>
                    <li class="list-group-item">
                        <span class="label">最后一次登陆：</span>
                        <span class="value">{{ $user->add->updated_at }}</span>
                    </li>
                </ul>
            </div>
        </div>

        <div class="row mb-3 p-3 bg-body rounded shadow-sm">
            <h6 class="border-bottom pb-2 mb-0">最近新更</h6>
            <div class="d-flex text-body-secondary pt-3">
                <i class="bi bi-person-circle text-primary fs-4 me-2"></i>
                <p class="pb-3 mb-0 small lh-sm border-bottom">
                    <strong class="d-block text-gray-dark">@username</strong>
                    Some representative placeholder content, with some information about this user. Imagine this being some sort of status update, perhaps?
                </p>
            </div>
            <small class="d-block text-end mt-3"><a href="#">查看更多</a></small>
        </div>
    </div>
</div>
@endsection
